package com.zmzncs.lmtc.module.park.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.park.pojo.reserve_record.ReserveRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.park.pojo.reserve_record.ReserveRecordDTO;
import com.zmzncs.lmtc.module.park.pojo.reserve_record.ReserveRecordManageForm;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 预约记录表 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2020-12-15
 */
@Repository
public interface ReserveRecordDao extends BaseMapper<ReserveRecord> {

    /** 获取预约记录分页列表*/
    IPage<ReserveRecordDTO> reserveRecordPage(Page page,@Param("form") ReserveRecordManageForm form);

    /**预约记录详情 */
    ReserveRecordDTO getReserveRecordById(Long id);

    /** 根据流水号查询预约记录*/
    ReserveRecordDTO getReserveRecordByOrderCode(String tradeNo);

    /**根据停车场ID删除停车场预约记录*/
    void deleteRecordByParkId(Long parkId);

}
